package com.scau.database.controller.admin;

import com.scau.data.entity.StoreDO;
import com.scau.database.service.admin.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: kongyuer
 * @Date: 2020/5/9 17:55
 */
@RestController
@RequestMapping("/api/admin")
public class StoreController {

    @Autowired
    public StoreService storeService;

    @GetMapping("/getStore")
    public List<StoreDO> getStore () {
        return storeService.echo();
    }

    @PostMapping("/addStore")
    public Integer addStore (@RequestBody StoreDO DO) {
        return storeService.addStore(DO);
    }
}
